﻿@using WaterRevenueMS.Domain.ViewModels.Authen.User
@using WaterRevenueMS.Domain.ViewModels.AdminCommon

@model SearchModel
@{
    var createButton = new ButtonModel();
    createButton = ViewBag.Create;
}

<div class="widget-box">
    <div class="widget-title">
        <span class="icon"><i class="icon-search"></i></span>
        <h5>查询条件</h5>
    </div>
    <div class="widget-content nopadding">
        @using (Html.BeginForm("", "", FormMethod.Post, new { @class = "form-horizontal search-form", @novalidate = "novalidate", @name = "basic_validate" }))
        {
            <div class="control-group">
                <div class="search-group">
                    <label class="search-label">用户名</label>
                    <div class="span2 search-input">
                        @Html.TextBoxFor(t => t.LoginName)
                    </div>
                </div>
                <div class="search-group">
                    <label class="search-label">姓名</label>
                    <div class="span2 search-input">
                        @Html.TextBoxFor(t => t.FullName)
                    </div>
                </div>
                <div class="search-group">
                    <label class="search-label">电子邮件</label>
                    <div class="span2 search-input">
                        @Html.TextBoxFor(t => t.Email)
                    </div>
                </div>
            </div>

            <div class="control-group none-border">
                <div class="search-group">
                    <label class="search-label">电话号码</label>
                    <div class="span2 search-input">
                        @Html.TextBoxFor(t => t.Phone)
                    </div>
                </div>
                <div class="search-group">
                    <label class="search-label">是否已激活</label>
                    <div class="span2 search-input">
                        @Html.DropDownListFor(t => t.Enabled, Model.EnabledItems)
                    </div>
                </div>
            </div>

            <div class="control-group none-border">
                <div class="search-group">
                    <label class="search-label">注册开始日期</label>
                    <div class="span2 search-input">
                         @Html.DatePickerFor(t => t.StartTime)
                    </div>
                </div>
                 <div class="search-group">
                    <label class="search-label">注册结束日期</label>
                    <div class="span2 search-input">
                         @Html.DatePickerFor(t => t.EndTime)
                    </div>
                </div>
            </div>

            <div class="form-actions form-operate text-right ">
                <button type="button" class="btn btn-danger" onclick="ClearForm($('.search-form'));">
                    <span class="icon-bullhorn"></span> 清空
                </button>
                <button type="button" class="btn btn-success" onclick="Search()">
                    <span class="icon-search"></span> 搜索
                </button>
                @if (createButton != null)
                {
                    <button type="button" class="btn btn-primary" onclick="Create()">
                        <span class="@createButton.Icon"></span> @createButton.Text
                    </button>
                }
            </div>

        }

    </div>
</div>